// import { createStore, applyMiddleware, combineReducers, compose } from 'redux'
// import rootReducer from './modules'
// import thunk from 'redux-thunk';
//
// // const createStoreWithMiddleware = applyMiddleware(
// //   thunkMiddleware
// // )(createStore)
//
//
// const finalCreateStore = compose(
//   applyMiddleware(thunk)
// )(createStore);
//
// export default function configureStore(initialState) {
//   //const store = createStoreWithMiddleware(rootReducer, initialState)
//  const store = finalCreateStore(rootReducer);
//
//   // if (module.hot) {
//   //   // Enable Webpack hot module replacement for reducers
//   //   module.hot.accept('../reducers', () => {
//   //     const nextRootReducer = require('../reducers')
//   //     store.replaceReducer(nextRootReducer)
//   //   })
//   // }
//
//   return store
// }
let config = require('config');

if (config.default.appEnv === 'dev') {
  module.exports = require('./containers/configureStore.dev');
} else {
  module.exports = require('./containers/configureStore.prod');
}
